import major from "./major"; //金专

const router = [
    { path: "/", redirect: "/touristHomepage" },
    {
        path: "/main",
        name: "main",
        component: () => import("../views/container/container.vue"),
        children: [
            {
                path: "/index",
                name: "index",
                component: () => import("../views/home/index.vue"),
                meta: {
                    title: "首页",
                    requireAuth: true
                }
            },
            ...major
        ]
    },
    {
        path: "/login",
        name: "login",
        component: () => import("../views/container/login.vue"),
        meta: { title: "登录" }
    },
    //   注册
    {
        path: "/register",
        name: "register",
        component: () => import("../views/container/register.vue"),
        meta: { title: "注册" }
    },
    // 忘记密码
    {
        path: "/forget",
        name: "forget",
        component: () => import("../views/container/forget.vue"),
        meta: { title: "忘记密码" }
    },
    {
        path: "/404",
        name: "404",
        component: () => import("../views/container/404.vue"),
        meta: { title: "404" }
    },
    {
        path: "/touristHomepage",
        name: "touristHomepage",
        component: () => import("../views/notLoggedIn/TouristHomepage.vue"),
        meta: { title: "游客首页" },
        children: [

        ]
    },
    {
        path: "/touristHomepage/tourism",
        name: "touristDetail",
        component: () => import("../views/notLoggedIn/TouristHomepageDetail.vue"),
        meta: { title: "游客首页详情页" }
    },
    {
        path: "/home",
        name: "home",
        component: () => import("../views/home/index.vue"),
        meta: { title: "登录用户首页" },

    },
    { path: "/:pathMatch(.*)", redirect: "/404" }

];
export default router;